<template>
    <div>
        <van-loading color="red"  v-if="loading" class="pos"/>
        <div class="box" ref="box" v-else>
<!--            <div class="mytop">-->
<!--                <div @click="back">&lt; 返回</div>-->
<!--                <div>新闻详情</div>-->
<!--                <div></div>-->
<!--            </div>-->

<!--            <div>-->


<!--            <div id="retTop" @click="top"><span style="font-size: 24px"><van-icon name="arrow-up" /></span></div>-->
            <div class="box">
                <router-link to="/myapp/hot">
                    <div class="fanHui"><van-icon name="arrow-left" />返回</div>
                </router-link>
                <div style="width: 85%;float: right">
                    <van-notice-bar scrollable :text="content1" />
                </div>
            </div>
            <div v-html="content" style="margin-top: 40px;padding: 5px 5px 10px 5px"></div>

<!--        </div>-->



        </div>
    </div>
</template>

<script>
    export default {
        name: "HotSon",
        data(){
            return{
                content1:"",
                content:"",
                loading:false
            }
        },
        created() {
            let uniquekey = this.$route.query.uniquekey
            console.log(uniquekey)
            this.$axios.get(`/newsDetails-api?uniquekey=${uniquekey}&key=addaf38a60f8c48d1d87f8dcff9a285e`).then((res)=>{
                console.log(res.data.result)
                this.content1 = res.data.result.detail.title
                this.content = res.data.result.content
            })
        },
        methods:{
            // top(){
            //     var time = setInterval(function (){
            //         if (document.documentElement.scrollTop > 0) {
            //             document.documentElement.scrollTop -= 30;
            //         } else {
            //             clearInterval(time);
            //         }
            //     }, 5)
            // },
            back(){
                this.$router.push('/myapp/hot')
            }
        }
    }
</script>

<style scoped>
    .pos{
        position: absolute;
        top:46%;
        left:46%;
    }
    /*.mytop{*/
    /*    display:flex;*/
    /*    text-align: center;*/
    /*    height:50px;*/
    /*    line-height:50px;*/
    /*    background-color: rgb(204, 0, 0);*/
    /*    color:white;*/
    /*}*/
    /*.mytop>div:nth-child(1){*/
    /*    width:60px;*/
    /*}*/
    /*.mytop>div:nth-child(2){*/
    /*    width:calc(100% - 120px);*/
    /*    font-size: 18px;*/
    /*}*/
    /*.mytop>div:nth-child(3){*/
    /*    width:60px;*/
    /*}*/







    .box{
        margin-top:-40px;
        padding:5px;
    }
    .fanHui{
        float: left;
        width: 15%;
        height: 40px;
        text-align: center;
        line-height: 40px;
        color: red;
        background-color: #FFFBE8;
    }
    .notice-swipe {
        height: 40px;
        line-height: 40px;
    }
    /deep/.gundong{
        width: 100%;
    }
    /deep/.van-notice-bar__wrap>div{
        width: 100%;
    }
    #retTop{
        /*display: none;*/
        position: fixed;
        top: 85%;
        right: 5%;
        width: 40px;
        height: 40px;
        text-align: center;
        line-height: 40px;
        background-color: #1296FF;
    }
</style>